<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui">
    
    <body>

        <ui:composition template="./WEB-INF/templates/NoLeftMenuTemplate.xhtml">

            <ui:define name="leftMenu">

            </ui:define>

            <ui:define name="content">
                <h:form>
                    <p:panel styleClass="center noBorder">
                        <h:panelGrid columns="1" styleClass="noBorder center inlineBlock" id="loginPanel">  
                            <p:growl id="growl" showDetail="false" sticky="true" />
                                <p:inputText id="nombreUsuarioLogin" value="#{loginBean.nombreUsuario}" required="true" requiredMessage="#{messages.NombreUsuarioNecesario}" label="#{messages.NombreUsuario}">  
                                    <f:validator binding="#{loginNombreUsuarioValidator}"></f:validator>
                                    <p:ajax event="change" update="growl" />
                                </p:inputText>  
                                <p:watermark for="nombreUsuarioLogin" value="#{messages.NombreUsuario}" /> 

                                <p:password id="loginPassword" value="#{loginBean.password}" required="true" requiredMessage="#{messages.PasswordNecesario}" label="#{messages.Password}">
                                    <f:validateLength minimum="5" maximum="30"></f:validateLength>
                                    <p:watermark for="loginPassword" value="#{messages.Password}" />
                                </p:password>
                                <p:commandButton styleClass="loginButton" value="#{messages.LogIn}" update="loginPanel" id="ajax" action="#{loginBean.login}" />
                        </h:panelGrid>
                    </p:panel>
                </h:form>
            </ui:define>

        </ui:composition>

    </body>
</html>
